3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
Draw regions contain information about the clipping state. A region may be in one of three states, encoded by the following enumeration:
typedef enum TQ3XClipMaskState {
kQ3XClipMaskFullyExposed,
kQ3XClipMaskPartiallyExposed,
kQ3XClipMaskNotExposed
} TQ3XClipMaskState;
A fully exposed draw region has no overlapping windows; a partially exposed draw region has some overlapping windows; a not exposed draw region is entirely offscreen or completely covered by another window. You can determine the clipping state with the Q3XDrawRegion_GetClipFlags function.
If the clipping state is kQ3XClipMaskPartiallyExposed , you can use the Q3XDrawRegion_GetClipMask function to query the draw region for a bitmap that describes the clipping of the window. In the Mac OS environment, you can also use the Q3XDrawRegion_GetClipRegion routine to get information about clipping in the form of a handle to a QuickDraw region (a rgnHandle), or you can use the Q3XDrawRegion_GetGDHandle routine to return a GDHandle .
The Q3XDrawRegion_GetClipFlags function lets you get the clipping state of a draw region.
TQ3Status Q3XDrawRegion_GetClipFlags(
TQ3XDrawRegion drawRegion,
TQ3XClipMaskState *clipMaskState);
The Q3XDrawRegion_GetClipFlags function returns, in the clipMaskState parameter, one of three values that define the draw region's clipping mask state. The TQ3XClipMaskState values that can be returned are enumerated on [link] .
The Q3XDrawRegion_GetClipMask function lets you get a bitmap that describes the clipping state of a partially exposed draw region.
TQ3Status Q3XDrawRegion_GetClipMask(
TQ3XDrawRegion drawRegion,
TQ3Bitmap **clipMask);
The Q3XDrawRegion_GetClipMask function returns, in the clipMask parameter, a bitmap that describes the clipping of the window for the partially exposed draw region drawRegion. In this bitmap, 1 bits indicate exposed pixels and 0 bits indicate occluded pixels.
On a Macintosh, additional window-system-specific information about clipping is available, in the form of a RgnHandle describing the clip region, or a GDHandle :
The Q3XDrawRegion_GetClipRegion function lets you obtain a Mac OS RgnHandle value that describes the clip region of a partially exposed draw region.
TQ3Status Q3XDrawRegion_GetClipRegion(
TQ3XDrawRegion drawRegion,
RgnHandle *rgnHandle);
The Q3XDrawRegion_GetGDHandle function lets you obtain a Mac OS GDHandle value that describes the clip region of a partially exposed draw region.
TQ3Status Q3XDrawRegion_GetGDHandle(
TQ3XDrawRegion drawRegion,
GDHandle *gdHandle);
Previous | QD3D Book | Overview | Chapter Contents | Next |